-- clean_poison
-- create by zhuangsl
-- 技能：清除某种状态

return {
    apply = function(source, target, skillId, round, para, extra)
        -- 清除指定的属性
        PropM.deletePropById(target, "debuff", para[1]);

        -- 概率全清除
        local prop = PropM.combine(source, "all_clear", skillId);
        local rand = DungeonM.getRandSeed("all_clear") % 1000;

        if rand < PropM.apply(prop, 1) then
            -- 清除所有debuff
            PropM.deleteProp(target, "debuff");
        end

        -- 增加命中动作
        SkillM.getSequence(target):hit(source, target, skillId);

        -- 施放技能增加装备经验
        prop = PropM.combine(source, "skill_add_exp", skillId);
        if prop[3] > 0 then
            PropM.trigger(source, prop[1], prop[2]);
        end

        return { target, };
    end,

    parse = function(desc)
        local arr = string.explode(desc, ",");
        return { tonumber(arr[1]), };
    end,

    -- 解析技能描述
    parseDesc = function(source, skillId, desc, para)
        -- 不需要解析
        return desc;
    end,
};
